package com.itcncp.wechat.app.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.util.Date;

public class ItcsParticipantsInfo implements Serializable {
    /**
     * 参与方ID
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long participantId;

    /**
     * 参与方类型 1.支付方 2服务提供方(ServiceProvider) 3.本地清分服务方(ClearingOperator) 4.其他清分服务方
     *
     * @mbg.generated
     */
    private Byte participantsType;

    /**
     * 参与方简称
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 生效时间
     *
     * @mbg.generated
     */
    private Date startDate;

    /**
     * 失效日期
     *
     * @mbg.generated
     */
    private Date endDate;

    /**
     * 状态：1、激活；2、删除
     *
     * @mbg.generated
     */
    private Byte state;

    /**
     * 正式参与方标记
     *
     * @mbg.generated
     */
    private Byte formalFlag;

    /**
     * 参与方全称
     *
     * @mbg.generated
     */
    private String fullName;

    /**
     * 服务类型 1.公路电子收费 2.停车场 3.加油站
     *
     * @mbg.generated
     */
    private Byte serviceType;

    /**
     * 记录更新时间
     *
     * @mbg.generated
     */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public Long getParticipantId() {
        return participantId;
    }

    public void setParticipantId(Long participantId) {
        this.participantId = participantId;
    }

    public Byte getParticipantsType() {
        return participantsType;
    }

    public void setParticipantsType(Byte participantsType) {
        this.participantsType = participantsType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Byte getState() {
        return state;
    }

    public void setState(Byte state) {
        this.state = state;
    }

    public Byte getFormalFlag() {
        return formalFlag;
    }

    public void setFormalFlag(Byte formalFlag) {
        this.formalFlag = formalFlag;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public Byte getServiceType() {
        return serviceType;
    }

    public void setServiceType(Byte serviceType) {
        this.serviceType = serviceType;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", participantId=").append(participantId);
        sb.append(", participantsType=").append(participantsType);
        sb.append(", name=").append(name);
        sb.append(", startDate=").append(startDate);
        sb.append(", endDate=").append(endDate);
        sb.append(", state=").append(state);
        sb.append(", formalFlag=").append(formalFlag);
        sb.append(", fullName=").append(fullName);
        sb.append(", serviceType=").append(serviceType);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ItcsParticipantsInfo other = (ItcsParticipantsInfo) that;
        return (this.getParticipantId() == null ? other.getParticipantId() == null : this.getParticipantId().equals(other.getParticipantId()))
            && (this.getParticipantsType() == null ? other.getParticipantsType() == null : this.getParticipantsType().equals(other.getParticipantsType()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getStartDate() == null ? other.getStartDate() == null : this.getStartDate().equals(other.getStartDate()))
            && (this.getEndDate() == null ? other.getEndDate() == null : this.getEndDate().equals(other.getEndDate()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getFormalFlag() == null ? other.getFormalFlag() == null : this.getFormalFlag().equals(other.getFormalFlag()))
            && (this.getFullName() == null ? other.getFullName() == null : this.getFullName().equals(other.getFullName()))
            && (this.getServiceType() == null ? other.getServiceType() == null : this.getServiceType().equals(other.getServiceType()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getParticipantId() == null) ? 0 : getParticipantId().hashCode());
        result = prime * result + ((getParticipantsType() == null) ? 0 : getParticipantsType().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getStartDate() == null) ? 0 : getStartDate().hashCode());
        result = prime * result + ((getEndDate() == null) ? 0 : getEndDate().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getFormalFlag() == null) ? 0 : getFormalFlag().hashCode());
        result = prime * result + ((getFullName() == null) ? 0 : getFullName().hashCode());
        result = prime * result + ((getServiceType() == null) ? 0 : getServiceType().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }
}